﻿CREATE VIEW [acms].[UserPostUpload_View]
AS 
	SELECT 
		a.[Id],
		a.[UserId],
		b.[UserName],
		a.[PostId],
		a.[FileId],
		c.[FileType],
		c.[Width],
		c.[Height],
		a.[Title],
		a.[Comment],
		a.[IPAddress],
		a.[Reviewed],
		a.[Reported],
		a.[Suspended],
		a.[Created],
		a.[ConcurencyId]
	FROM [acms].[UserPostUpload] a 
		inner join [acms].[User_View] b on a.UserId = b.Id
		inner join [acms].[File_View] c on a.FileId = c.Id
	WHERE Deleted = 0
;